package com.fesco.mis.fm.exception;

public enum ExceptionEnum {

    //------------------------------系统类-------------------------------
    INVOKING_SUCCESS("FESCO-FM-00001", "调用成功"),
    SYSTEM_FAILURE("FESCO-FM-00002", "系统异常"),
    JSON_FAILURE("FESCO-FM-00003", "Json序列化对象错误"),
    METHOD_NOT_ALLOWED("FESCO-FM-00004", "POST/GET请求方式错误"),
    JSON_DATA_ERROR("FESCO-FM-00005", "JSON数据格式错误"),
    UNSUPPORTED_MEDIA_TYPE("FESCO-FM-00006", "请求数据类型不正确"),
    SERVICE_NOT_FOUND_ERROR("FESCO-FM-00008", "不存在此接口"),
    DATABASE_FAILURE("FESCO-FM-00009","数据库异常222222"),
    SERVICE_DEMO("FESCO-FM-00010","测试异常！");



    public String getMessage() {
        if (message == null) {
            return "";
        }
        return message;
    }

    public String getCode() {
        return code;
    }

    private String code;
    private String message;

    private ExceptionEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }


}
